#!/usr/bin/env python

import paho.mqtt.client as mqtt

mqttc = mqtt.Client("01-will-unpwd-set")

run = -1
mqttc.username_pw_set("oibvvwqw", "#'^2hg9a&nm38*us")
mqttc.will_set("will-topic", "will message", 2, False)
mqttc.connect("localhost", 1888)
while run == -1:
    mqttc.loop()

exit(run)
